import { isNil, toNumber } from "lodash-es";

export function isNilStrong(val: any) {
  return isNil(val) || val.toString().trim() === "";
}

/**
 * 尝试将输入的值转换为数字
 * @param val
 * @returns number | undefundefinedine
 */
export function parseNumber(val: any) {
  val = toNumber(val);
  return Number.isNaN(val) ? undefined : val;
}
